<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/view/system/common/head.jsp"%>
<script>
//重置
function resetForm() {
	$("#userQualifyForm")[0].reset();
}

//页面提交
function submitForm() {
	//判断参数是否为空
	var valid = $('#userQualifyForm').form('validate');
	if (valid) {
		//获取页面上所有的参数
		var param = getFormElementsForUrl();
		//提交后台处理  
		$.post("doUserQualify.action" + param, callback);
	}
}

function callback(date) {
	if (date != "") {
		var json = eval("(" + date + ")");
		if (json.records[0].messageCode == messageCodeSuccess) {
			$.messager.alert("<s:text name='mes.message'/>", json.records[0].messageDesc, 'info', function() {
					//alert(json.records[0].messageDesc);
					parent.$("#userDataGrid").datagrid('reload');
					parent.document.getElementById("userOperatorFrame").src = "";
			});
		} else {
			$.messager.alert("<s:text name='mes.message'/>",
					json.records[0].messageDesc, 'error');
		}
	}
}
</script>
<body>
	<s:form id="userQualifyForm" name="userQualifyForm" method="post">
		<div id="p" class="easyui-panel" title="员工转正" align="center"
			fit="true" style="padding: 10px; background: #fafafa;">
			<fieldset>
				<legend style="color: blue;" width=1.5>
					员工信息
				</legend>
				<table width="99%" border="0" cellpadding="4" cellspacing="1">
					<tr>
						<td width="24%" align="right">
							工号：
						</td>
						<td colspan="3" align="left" class="redText">
							${user.code}
						</td>
					</tr>
					<tr>
						<td width="24%" align="right">
							<input type="hidden" id="jsonflag" name="jsonflag"
								value="validation" />
							<input type="hidden" name="operatorUserId"
								value="${operatorUserId}" />
							姓名：
						</td>
						<td colspan="3" align="left" class="redText">
							${user.name}
						</td>
					</tr>
					<tr>
						<td width="24%" align="right">
							所属分组：
						</td>
						<td colspan="3" align="left" class="redText">
							${user.groupname}
						</td>
					</tr>
					<tr>
						<td width="24%" align="right">
							所属角色：
						</td>
						<td colspan="3" align="left" class="redText">
							${user.rolename}
						</td>
					</tr>
					<tr>
						<td width="24%" align="right">
							入职时间：
						</td>
						<td colspan="3" align="left" class="redText">
							${user.intodate}
						</td>
					</tr>
				</table>
			</fieldset>
			<fieldset>
				<legend style="color: blue;" width=1.5>
					转正信息
				</legend>
				<table width="99%" border="0" cellpadding="4" cellspacing="1">
					<tr>
						<td width="24%" align="right">
							转正时间：
						</td>
						<td colspan="3" class="redText">
							<input class="easyui-datebox" type="text" required="true"
								id="updateUser_jobdate" name="updateUser.jobdate"
								editable="false" value="" style="width: 150px"></input>
						</td>
					</tr>
				</table>
			</fieldset>
			<div align="center">
				<br />
				<a href="#" class="easyui-linkbutton" iconCls="icon-ok"
					onclick="submitForm()"><s:text name='add' /> </a>
				&nbsp;&nbsp;&nbsp;
				<a href="#" class="easyui-linkbutton" iconCls="icon-undo"
					onclick="resetForm()"><s:text name='reset' /> </a>
			</div>
		</div>
	</s:form>
</body>
</html>